package com.itheima.mapper;

import com.itheima.pojo.NursingLevel;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NursingLevelMapper {
    //分页查询数据
    List<NursingLevel> page(String name);

    //新增数据
    @Insert("insert into nursing_level(name,lplan_id,fee,status,description,create_by,update_by,remark,create_time,update_time) values (#{name},#{lplanId},#{fee},#{status},#{description},#{createBy},#{updateBy},#{remark},#{createTime},#{updateTime})")
    void add(NursingLevel np);

    //删除数据

    void delete(List<Integer> ids);

    //修改数据第一步回显
    @Select("select * from nursing_level where id=#{id}")
    NursingLevel getById(Integer id);

    //修改数据第二步删除操作
    void update(NursingLevel np);
}
